package eerbaar.internal.area;

import eerbaar.area.ISquare;
import eerbaar.elements.IElement;
import eerbaar.elements.IElementContainer;
import eerbaar.position.IPosition;

public class Square implements ISquare {

    private final IElementContainer container;

    private final IPosition position;

    public Square(IElementContainer container, IPosition position) {
        this.position = position;
        this.container = container;
    }

    @Override
    public IElement[] getElements() {

        return this.container.getElements(this.position);
    }

    @Override
    public IPosition getPosition() {
        return this.position;
    }

    @Override
    public String toString() {
        String s = "";
        s += "square(";
        s += "" + this.position;
        s += ")";
        return s;
    }

}
